473,461 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with aligning menu text and expand image correctly

35
Hello,

I have an "accordion menu" where I want the structure to be like this for a menu item with "children" who are supposed to drop down when an "expand image" is clicked:
Expand|Select|Wrap|Line Numbers
  1. <li>
  2.     <span>some text</span>
  3.     <img src="the_expand_image.gif" />
  4. </li>
Now, for each menu item like that I want to align the span to the left, and the img to the right in my <li>. I haven't been able to find a cross-browser solution, setting float:left and float:right respectively doesn't work in older versions of IE (with compatibility view in IE8). I've also tried putting divs around the items and displaying the whole thing as a table (display:table, display:table-cell), but without success (maybe I'm doing that wrong, since I feel it SHOULD work) in IE.

So, pros, how would you do it? :)

Thanks!
Jan 11 '10 #1
2 2112
drhowarddrfine
7,435 Expert 4TB
Not sure if this is what you mean but floating the image right alone doesn't do what you want?
Jan 11 '10 #2
brixton
35
It is, put simply, exactly what i WANT to do.
But doing this messes up the size of the <li> in IE7.
I need it to be exactly 30px high, and for some reason it becomes a few pixels higher than that if I do float:right on the image?
Jan 11 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: CJM | last post by:
I'm developing a web application, that has a left-sided navigation menu and a centre-right content area. The menu is static and therefore is in an INCLUDEd file. I'm wanting to add a link to a...
0
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo...
3
by: Paul Watt | last post by:
Hi, How can I get the menu text to sit at the bottom of the Div? http://www.paulwatt.info/test/anna/ -- Paul Watt http://www.paulwatt.info
4
by: Rabel | last post by:
I am not very good at javascript I mostly am a flash developer but I am trying to apply one of our old expanding menus to work for a new site but it doesn't collapse the way I need it to right now...
1
by: jobo | last post by:
I have a news section of the website contained within the updatepanel. What I want is that when a news summary is clicked, the news item opens up in that same box. I thought I wired everything up...
1
by: Nospam | last post by:
I am trying to have an expandable menu each time it's clicked expands, and if it's clicked again, if it is already expanded contracts, and if contracted expands, following this example...
17
by: Nyris | last post by:
I have this code used for the navigation on an HTML page. It's an accordion style dropdown menu. Everything works fine I just need to change it so that the submenuheader class allows it to be a...
7
by: milestogofromhere | last post by:
It is late so this is probably something really obvious but I am not seeing it. Can someone please help? Here is the page in question: html - http://www.itsyourplate.com/index2.php css -...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.